PROJECT(FLIGHT_CHESS_BOARD)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
SET(CMAKE_CXX_COMPILER "g++")
SET(CMAKE_CXX_FLAGS "-g -Wall -std=c++11 -pthread")
#设定运行程序的存放路径
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
#设定运行依赖库的存放路径
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
#一些头文件的存放路径
INCLUDE_DIRECTORIES(./)
INCLUDE_DIRECTORIES(~/git/depend_lib/include)
#一些依赖库的存放路径
LINK_DIRECTORIES(~/git/depend_lib/lib)
LINK_DIRECTORIES(${PROJECT_BINARY_DIR}/lib)
#指定一些要编译的子目录
ADD_SUBDIRECTORY(common)
ADD_SUBDIRECTORY(control)
ADD_SUBDIRECTORY(model)
#指定链接运行程序的时候需要带上的代码文件
ADD_EXECUTABLE(flight_chess_board_server main.cpp)
#指定运行程序所需要链接的库
TARGET_LINK_LIBRARIES(flight_chess_board_server model control muduo_base_cpp11 muduo_net_cpp11)
